//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension PrivateNetworks {
    // MARK: Enums

    public enum AcknowledgmentStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case acknowledged = "ACKNOWLEDGED"
        case acknowledging = "ACKNOWLEDGING"
        case unacknowledged = "UNACKNOWLEDGED"
        public var description: String { return self.rawValue }
    }

    public enum CommitmentLength: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case oneYear = "ONE_YEAR"
        case sixtyDays = "SIXTY_DAYS"
        case threeYears = "THREE_YEARS"
        public var description: String { return self.rawValue }
    }

    public enum DeviceIdentifierFilterKeys: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case order = "ORDER"
        case status = "STATUS"
        case trafficGroup = "TRAFFIC_GROUP"
        public var description: String { return self.rawValue }
    }

    public enum DeviceIdentifierStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum ElevationReference: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case agl = "AGL"
        case amsl = "AMSL"
        public var description: String { return self.rawValue }
    }

    public enum ElevationUnit: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        /// Feet.
        case feet = "FEET"
        public var description: String { return self.rawValue }
    }

    public enum HealthStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case healthy = "HEALTHY"
        case initial = "INITIAL"
        case unhealthy = "UNHEALTHY"
        public var description: String { return self.rawValue }
    }

    public enum NetworkFilterKeys: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case status = "STATUS"
        public var description: String { return self.rawValue }
    }

    public enum NetworkResourceDefinitionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deviceIdentifier = "DEVICE_IDENTIFIER"
        case radioUnit = "RADIO_UNIT"
        public var description: String { return self.rawValue }
    }

    public enum NetworkResourceFilterKeys: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case order = "ORDER"
        case status = "STATUS"
        public var description: String { return self.rawValue }
    }

    public enum NetworkResourceStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "AVAILABLE"
        case creatingShippingLabel = "CREATING_SHIPPING_LABEL"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case pending = "PENDING"
        case pendingReturn = "PENDING_RETURN"
        case provisioned = "PROVISIONED"
        case provisioning = "PROVISIONING"
        case shipped = "SHIPPED"
        public var description: String { return self.rawValue }
    }

    public enum NetworkResourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case radioUnit = "RADIO_UNIT"
        public var description: String { return self.rawValue }
    }

    public enum NetworkSiteFilterKeys: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case status = "STATUS"
        public var description: String { return self.rawValue }
    }

    public enum NetworkSiteStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "AVAILABLE"
        case created = "CREATED"
        case deleted = "DELETED"
        case deprovisioning = "DEPROVISIONING"
        case provisioning = "PROVISIONING"
        public var description: String { return self.rawValue }
    }

    public enum NetworkStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "AVAILABLE"
        case created = "CREATED"
        case deleted = "DELETED"
        case deprovisioning = "DEPROVISIONING"
        case provisioning = "PROVISIONING"
        public var description: String { return self.rawValue }
    }

    public enum OrderFilterKeys: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case networkSite = "NETWORK_SITE"
        case status = "STATUS"
        public var description: String { return self.rawValue }
    }

    public enum UpdateType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case commitment = "COMMITMENT"
        case replace = "REPLACE"
        case `return` = "RETURN"
        public var description: String { return self.rawValue }
    }

    public enum ValidationExceptionReason: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cannotAssumeRole = "CANNOT_ASSUME_ROLE"
        case cannotParse = "CANNOT_PARSE"
        case fieldValidationFailed = "FIELD_VALIDATION_FAILED"
        case other = "OTHER"
        case unknownOperation = "UNKNOWN_OPERATION"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AcknowledgeOrderReceiptRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the order.
        public let orderArn: String

        @inlinable
        public init(orderArn: String) {
            self.orderArn = orderArn
        }

        public func validate(name: String) throws {
            try self.validate(self.orderArn, name: "orderArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case orderArn = "orderArn"
        }
    }

    public struct AcknowledgeOrderReceiptResponse: AWSDecodableShape {
        /// Information about the order.
        public let order: Order

        @inlinable
        public init(order: Order) {
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case order = "order"
        }
    }

    public struct ActivateDeviceIdentifierRequest: AWSEncodableShape {
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the device identifier.
        public let deviceIdentifierArn: String

        @inlinable
        public init(clientToken: String? = nil, deviceIdentifierArn: String) {
            self.clientToken = clientToken
            self.deviceIdentifierArn = deviceIdentifierArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.deviceIdentifierArn, name: "deviceIdentifierArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case deviceIdentifierArn = "deviceIdentifierArn"
        }
    }

    public struct ActivateDeviceIdentifierResponse: AWSDecodableShape {
        /// Information about the device identifier.
        public let deviceIdentifier: DeviceIdentifier
        ///  The tags on the device identifier.
        public let tags: [String: String]?

        @inlinable
        public init(deviceIdentifier: DeviceIdentifier, tags: [String: String]? = nil) {
            self.deviceIdentifier = deviceIdentifier
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case deviceIdentifier = "deviceIdentifier"
            case tags = "tags"
        }
    }

    public struct ActivateNetworkSiteRequest: AWSEncodableShape {
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// Determines the duration and renewal status of the commitment period for all pending radio units. If you include commitmentConfiguration in the ActivateNetworkSiteRequest action, you must specify the following:   The commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year period.   Whether you want your commitment period to automatically renew for one more year after your current commitment period expires.   For pricing, see Amazon Web Services Private 5G Pricing. If you do not include commitmentConfiguration in the ActivateNetworkSiteRequest action, the commitment period is set to 60-days.
        public let commitmentConfiguration: CommitmentConfiguration?
        /// The Amazon Resource Name (ARN) of the network site.
        public let networkSiteArn: String
        /// The shipping address of the network site.
        public let shippingAddress: Address

        @inlinable
        public init(clientToken: String? = nil, commitmentConfiguration: CommitmentConfiguration? = nil, networkSiteArn: String, shippingAddress: Address) {
            self.clientToken = clientToken
            self.commitmentConfiguration = commitmentConfiguration
            self.networkSiteArn = networkSiteArn
            self.shippingAddress = shippingAddress
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.networkSiteArn, name: "networkSiteArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
            try self.shippingAddress.validate(name: "\(name).shippingAddress")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case commitmentConfiguration = "commitmentConfiguration"
            case networkSiteArn = "networkSiteArn"
            case shippingAddress = "shippingAddress"
        }
    }

    public struct ActivateNetworkSiteResponse: AWSDecodableShape {
        /// Information about the network site.
        public let networkSite: NetworkSite?

        @inlinable
        public init(networkSite: NetworkSite? = nil) {
            self.networkSite = networkSite
        }

        private enum CodingKeys: String, CodingKey {
            case networkSite = "networkSite"
        }
    }

    public struct Address: AWSEncodableShape & AWSDecodableShape {
        /// The city for this address.
        public let city: String
        /// The company name for this address.
        public let company: String?
        /// The country for this address.
        public let country: String
        /// The recipient's email address.
        public let emailAddress: String?
        /// The recipient's name for this address.
        public let name: String
        /// The recipient's phone number.
        public let phoneNumber: String?
        /// The postal code for this address.
        public let postalCode: String
        /// The state or province for this address.
        public let stateOrProvince: String
        /// The first line of the street address.
        public let street1: String
        /// The second line of the street address.
        public let street2: String?
        /// The third line of the street address.
        public let street3: String?

        @inlinable
        public init(city: String, company: String? = nil, country: String, emailAddress: String? = nil, name: String, phoneNumber: String? = nil, postalCode: String, stateOrProvince: String, street1: String, street2: String? = nil, street3: String? = nil) {
            self.city = city
            self.company = company
            self.country = country
            self.emailAddress = emailAddress
            self.name = name
            self.phoneNumber = phoneNumber
            self.postalCode = postalCode
            self.stateOrProvince = stateOrProvince
            self.street1 = street1
            self.street2 = street2
            self.street3 = street3
        }

        public func validate(name: String) throws {
            try self.validate(self.city, name: "city", parent: name, max: 1024)
            try self.validate(self.city, name: "city", parent: name, min: 1)
            try self.validate(self.company, name: "company", parent: name, max: 1024)
            try self.validate(self.company, name: "company", parent: name, min: 1)
            try self.validate(self.country, name: "country", parent: name, max: 1024)
            try self.validate(self.country, name: "country", parent: name, min: 1)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, max: 1024)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, max: 1024)
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, min: 1)
            try self.validate(self.postalCode, name: "postalCode", parent: name, max: 1024)
            try self.validate(self.postalCode, name: "postalCode", parent: name, min: 1)
            try self.validate(self.stateOrProvince, name: "stateOrProvince", parent: name, max: 1024)
            try self.validate(self.stateOrProvince, name: "stateOrProvince", parent: name, min: 1)
            try self.validate(self.street1, name: "street1", parent: name, max: 1024)
            try self.validate(self.street1, name: "street1", parent: name, min: 1)
            try self.validate(self.street2, name: "street2", parent: name, max: 1024)
            try self.validate(self.street2, name: "street2", parent: name, min: 1)
            try self.validate(self.street3, name: "street3", parent: name, max: 1024)
            try self.validate(self.street3, name: "street3", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case city = "city"
            case company = "company"
            case country = "country"
            case emailAddress = "emailAddress"
            case name = "name"
            case phoneNumber = "phoneNumber"
            case postalCode = "postalCode"
            case stateOrProvince = "stateOrProvince"
            case street1 = "street1"
            case street2 = "street2"
            case street3 = "street3"
        }
    }

    public struct CommitmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether the commitment period for a radio unit is set to automatically renew for an additional 1 year after your current commitment period expires. Set to True, if you want your commitment period to automatically renew. Set to False if you do not want your commitment to automatically renew. You can do the following:   Set a 1-year commitment to automatically renew for an additional 1 year. The hourly rate for the additional year will continue to be the same as your existing 1-year rate.   Set a 3-year commitment to automatically renew for an additional 1 year. The hourly rate for the additional year will continue to be the same as your existing 3-year rate.   Turn off a previously-enabled automatic renewal on a 1-year or 3-year commitment.   You cannot use the automatic-renewal option for a 60-day commitment.
        public let automaticRenewal: Bool
        /// The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year period.
        public let commitmentLength: CommitmentLength

        @inlinable
        public init(automaticRenewal: Bool, commitmentLength: CommitmentLength) {
            self.automaticRenewal = automaticRenewal
            self.commitmentLength = commitmentLength
        }

        private enum CodingKeys: String, CodingKey {
            case automaticRenewal = "automaticRenewal"
            case commitmentLength = "commitmentLength"
        }
    }

    public struct CommitmentInformation: AWSDecodableShape {
        /// The duration and renewal status of the commitment period for the radio unit.
        public let commitmentConfiguration: CommitmentConfiguration
        /// The date and time that the commitment period ends. If you do not cancel or renew the commitment before the expiration date, you will be billed at the 60-day-commitment rate.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var expiresOn: Date?
        /// The date and time that the commitment period started.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var startAt: Date?

        @inlinable
        public init(commitmentConfiguration: CommitmentConfiguration, expiresOn: Date? = nil, startAt: Date? = nil) {
            self.commitmentConfiguration = commitmentConfiguration
            self.expiresOn = expiresOn
            self.startAt = startAt
        }

        private enum CodingKeys: String, CodingKey {
            case commitmentConfiguration = "commitmentConfiguration"
            case expiresOn = "expiresOn"
            case startAt = "startAt"
        }
    }

    public struct ConfigureAccessPointRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the network resource.
        public let accessPointArn: String
        /// A Base64 encoded string of the CPI certificate associated with the CPI user who is certifying the coordinates of the network resource.
        public let cpiSecretKey: String?
        /// The CPI user ID of the CPI user who is certifying the coordinates of the network resource.
        public let cpiUserId: String?
        /// The CPI user name of the CPI user who is certifying the coordinates of the radio unit.
        public let cpiUsername: String?
        /// The CPI password associated with the CPI certificate in cpiSecretKey.
        public let cpiUserPassword: String?
        /// The position of the network resource.
        public let position: Position?

        @inlinable
        public init(accessPointArn: String, cpiSecretKey: String? = nil, cpiUserId: String? = nil, cpiUsername: String? = nil, cpiUserPassword: String? = nil, position: Position? = nil) {
            self.accessPointArn = accessPointArn
            self.cpiSecretKey = cpiSecretKey
            self.cpiUserId = cpiUserId
            self.cpiUsername = cpiUsername
            self.cpiUserPassword = cpiUserPassword
            self.position = position
        }

        public func validate(name: String) throws {
            try self.validate(self.accessPointArn, name: "accessPointArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessPointArn = "accessPointArn"
            case cpiSecretKey = "cpiSecretKey"
            case cpiUserId = "cpiUserId"
            case cpiUsername = "cpiUsername"
            case cpiUserPassword = "cpiUserPassword"
            case position = "position"
        }
    }

    public struct ConfigureAccessPointResponse: AWSDecodableShape {
        /// Information about the network resource.
        public let accessPoint: NetworkResource

        @inlinable
        public init(accessPoint: NetworkResource) {
            self.accessPoint = accessPoint
        }

        private enum CodingKeys: String, CodingKey {
            case accessPoint = "accessPoint"
        }
    }

    public struct CreateNetworkRequest: AWSEncodableShape {
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// The description of the network.
        public let description: String?
        /// The name of the network. You can't change the name after you create the network.
        public let networkName: String
        ///  The tags to apply to the network.
        public let tags: [String: String]?

        @inlinable
        public init(clientToken: String? = nil, description: String? = nil, networkName: String, tags: [String: String]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.networkName = networkName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 100)
            try self.validate(self.networkName, name: "networkName", parent: name, max: 64)
            try self.validate(self.networkName, name: "networkName", parent: name, min: 1)
            try self.validate(self.networkName, name: "networkName", parent: name, pattern: "^[0-9a-zA-Z-]*$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x1f\\x22]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case description = "description"
            case networkName = "networkName"
            case tags = "tags"
        }
    }

    public struct CreateNetworkResponse: AWSDecodableShape {
        /// Information about the network.
        public let network: Network
        ///  The network tags.
        public let tags: [String: String]?

        @inlinable
        public init(network: Network, tags: [String: String]? = nil) {
            self.network = network
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case network = "network"
            case tags = "tags"
        }
    }

    public struct CreateNetworkSiteRequest: AWSEncodableShape {
        /// The Availability Zone that is the parent of this site. You can't change the Availability Zone after you create the site.
        public let availabilityZone: String?
        /// The ID of the Availability Zone that is the parent of this site. You can't change the Availability Zone after you create the site.
        public let availabilityZoneId: String?
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// The description of the site.
        public let description: String?
        /// The Amazon Resource Name (ARN) of the network.
        public let networkArn: String
        /// The name of the site. You can't change the name after you create the site.
        public let networkSiteName: String
        /// Information about the pending plan for this site.
        public let pendingPlan: SitePlan?
        ///  The tags to apply to the network site.
        public let tags: [String: String]?

        @inlinable
        public init(availabilityZone: String? = nil, availabilityZoneId: String? = nil, clientToken: String? = nil, description: String? = nil, networkArn: String, networkSiteName: String, pendingPlan: SitePlan? = nil, tags: [String: String]? = nil) {
            self.availabilityZone = availabilityZone
            self.availabilityZoneId = availabilityZoneId
            self.clientToken = clientToken
            self.description = description
            self.networkArn = networkArn
            self.networkSiteName = networkSiteName
            self.pendingPlan = pendingPlan
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 100)
            try self.validate(self.networkArn, name: "networkArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
            try self.validate(self.networkSiteName, name: "networkSiteName", parent: name, max: 64)
            try self.validate(self.networkSiteName, name: "networkSiteName", parent: name, min: 1)
            try self.validate(self.networkSiteName, name: "networkSiteName", parent: name, pattern: "^[0-9a-zA-Z-]*$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x1f\\x22]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "availabilityZone"
            case availabilityZoneId = "availabilityZoneId"
            case clientToken = "clientToken"
            case description = "description"
            case networkArn = "networkArn"
            case networkSiteName = "networkSiteName"
            case pendingPlan = "pendingPlan"
            case tags = "tags"
        }
    }

    public struct CreateNetworkSiteResponse: AWSDecodableShape {
        /// Information about the network site.
        public let networkSite: NetworkSite?
        ///  The network site tags.
        public let tags: [String: String]?

        @inlinable
        public init(networkSite: NetworkSite? = nil, tags: [String: String]? = nil) {
            self.networkSite = networkSite
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case networkSite = "networkSite"
            case tags = "tags"
        }
    }

    public struct DeactivateDeviceIdentifierRequest: AWSEncodableShape {
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the device identifier.
        public let deviceIdentifierArn: String

        @inlinable
        public init(clientToken: String? = nil, deviceIdentifierArn: String) {
            self.clientToken = clientToken
            self.deviceIdentifierArn = deviceIdentifierArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.deviceIdentifierArn, name: "deviceIdentifierArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case deviceIdentifierArn = "deviceIdentifierArn"
        }
    }

    public struct DeactivateDeviceIdentifierResponse: AWSDecodableShape {
        /// Information about the device identifier.
        public let deviceIdentifier: DeviceIdentifier

        @inlinable
        public init(deviceIdentifier: DeviceIdentifier) {
            self.deviceIdentifier = deviceIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case deviceIdentifier = "deviceIdentifier"
        }
    }

    public struct DeleteNetworkRequest: AWSEncodableShape {
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the network.
        public let networkArn: String

        @inlinable
        public init(clientToken: String? = nil, networkArn: String) {
            self.clientToken = clientToken
            self.networkArn = networkArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            request.encodePath(self.networkArn, key: "networkArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.networkArn, name: "networkArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteNetworkResponse: AWSDecodableShape {
        /// Information about the network.
        public let network: Network

        @inlinable
        public init(network: Network) {
            self.network = network
        }

        private enum CodingKeys: String, CodingKey {
            case network = "network"
        }
    }

    public struct DeleteNetworkSiteRequest: AWSEncodableShape {
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the network site.
        public let networkSiteArn: String

        @inlinable
        public init(clientToken: String? = nil, networkSiteArn: String) {
            self.clientToken = clientToken
            self.networkSiteArn = networkSiteArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            request.encodePath(self.networkSiteArn, key: "networkSiteArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.networkSiteArn, name: "networkSiteArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteNetworkSiteResponse: AWSDecodableShape {
        /// Information about the network site.
        public let networkSite: NetworkSite?

        @inlinable
        public init(networkSite: NetworkSite? = nil) {
            self.networkSite = networkSite
        }

        private enum CodingKeys: String, CodingKey {
            case networkSite = "networkSite"
        }
    }

    public struct DeviceIdentifier: AWSDecodableShape {
        /// The creation time of this device identifier.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The Amazon Resource Name (ARN) of the device identifier.
        public let deviceIdentifierArn: String?
        /// The Integrated Circuit Card Identifier of the device identifier.
        public let iccid: String?
        /// The International Mobile Subscriber Identity of the device identifier.
        public let imsi: String?
        /// The Amazon Resource Name (ARN) of the network on which the device identifier appears.
        public let networkArn: String?
        /// The Amazon Resource Name (ARN) of the order used to purchase the device identifier.
        public let orderArn: String?
        /// The status of the device identifier.
        public let status: DeviceIdentifierStatus?
        /// The Amazon Resource Name (ARN) of the traffic group to which the device identifier belongs.
        public let trafficGroupArn: String?
        /// The vendor of the device identifier.
        public let vendor: String?

        @inlinable
        public init(createdAt: Date? = nil, deviceIdentifierArn: String? = nil, iccid: String? = nil, imsi: String? = nil, networkArn: String? = nil, orderArn: String? = nil, status: DeviceIdentifierStatus? = nil, trafficGroupArn: String? = nil, vendor: String? = nil) {
            self.createdAt = createdAt
            self.deviceIdentifierArn = deviceIdentifierArn
            self.iccid = iccid
            self.imsi = imsi
            self.networkArn = networkArn
            self.orderArn = orderArn
            self.status = status
            self.trafficGroupArn = trafficGroupArn
            self.vendor = vendor
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "createdAt"
            case deviceIdentifierArn = "deviceIdentifierArn"
            case iccid = "iccid"
            case imsi = "imsi"
            case networkArn = "networkArn"
            case orderArn = "orderArn"
            case status = "status"
            case trafficGroupArn = "trafficGroupArn"
            case vendor = "vendor"
        }
    }

    public struct GetDeviceIdentifierRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the device identifier.
        public let deviceIdentifierArn: String

        @inlinable
        public init(deviceIdentifierArn: String) {
            self.deviceIdentifierArn = deviceIdentifierArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.deviceIdentifierArn, key: "deviceIdentifierArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.deviceIdentifierArn, name: "deviceIdentifierArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetDeviceIdentifierResponse: AWSDecodableShape {
        /// Information about the device identifier.
        public let deviceIdentifier: DeviceIdentifier?
        ///  The device identifier tags.
        public let tags: [String: String]?

        @inlinable
        public init(deviceIdentifier: DeviceIdentifier? = nil, tags: [String: String]? = nil) {
            self.deviceIdentifier = deviceIdentifier
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case deviceIdentifier = "deviceIdentifier"
            case tags = "tags"
        }
    }

    public struct GetNetworkRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the network.
        public let networkArn: String

        @inlinable
        public init(networkArn: String) {
            self.networkArn = networkArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.networkArn, key: "networkArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.networkArn, name: "networkArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetNetworkResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the network resource.
        public let networkResourceArn: String

        @inlinable
        public init(networkResourceArn: String) {
            self.networkResourceArn = networkResourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.networkResourceArn, key: "networkResourceArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.networkResourceArn, name: "networkResourceArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetNetworkResourceResponse: AWSDecodableShape {
        /// Information about the network resource.
        public let networkResource: NetworkResource
        ///  The network resource tags.
        public let tags: [String: String]?

        @inlinable
        public init(networkResource: NetworkResource, tags: [String: String]? = nil) {
            self.networkResource = networkResource
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case networkResource = "networkResource"
            case tags = "tags"
        }
    }

    public struct GetNetworkResponse: AWSDecodableShape {
        /// Information about the network.
        public let network: Network
        ///  The network tags.
        public let tags: [String: String]?

        @inlinable
        public init(network: Network, tags: [String: String]? = nil) {
            self.network = network
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case network = "network"
            case tags = "tags"
        }
    }

    public struct GetNetworkSiteRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the network site.
        public let networkSiteArn: String

        @inlinable
        public init(networkSiteArn: String) {
            self.networkSiteArn = networkSiteArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.networkSiteArn, key: "networkSiteArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.networkSiteArn, name: "networkSiteArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetNetworkSiteResponse: AWSDecodableShape {
        /// Information about the network site.
        public let networkSite: NetworkSite?
        ///  The network site tags.
        public let tags: [String: String]?

        @inlinable
        public init(networkSite: NetworkSite? = nil, tags: [String: String]? = nil) {
            self.networkSite = networkSite
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case networkSite = "networkSite"
            case tags = "tags"
        }
    }

    public struct GetOrderRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the order.
        public let orderArn: String

        @inlinable
        public init(orderArn: String) {
            self.orderArn = orderArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.orderArn, key: "orderArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.orderArn, name: "orderArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetOrderResponse: AWSDecodableShape {
        /// Information about the order.
        public let order: Order
        ///  The order tags.
        public let tags: [String: String]?

        @inlinable
        public init(order: Order, tags: [String: String]? = nil) {
            self.order = order
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case order = "order"
            case tags = "tags"
        }
    }

    public struct InternalServerException: AWSErrorShape {
        /// Description of the error.
        public let message: String
        /// Advice to clients on when the call can be safely retried.
        public let retryAfterSeconds: Int?

        @inlinable
        public init(message: String, retryAfterSeconds: Int? = nil) {
            self.message = message
            self.retryAfterSeconds = retryAfterSeconds
        }

        public init(from decoder: Decoder) throws {
            let response = decoder.userInfo[.awsResponse]! as! ResponseDecodingContainer
            let container = try decoder.container(keyedBy: CodingKeys.self)
            self.message = try container.decode(String.self, forKey: .message)
            self.retryAfterSeconds = try response.decodeHeaderIfPresent(Int.self, key: "Retry-After")
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
        }
    }

    public struct ListDeviceIdentifiersRequest: AWSEncodableShape {
        /// The filters.    ORDER - The Amazon Resource Name (ARN) of the order.    STATUS - The status (ACTIVE | INACTIVE).    TRAFFIC_GROUP - The Amazon Resource Name (ARN) of the traffic group.   Filter values are case sensitive. If you specify multiple  values for a filter, the values are joined with an OR, and the request returns  all results that match any of the specified values.
        public let filters: [DeviceIdentifierFilterKeys: [String]]?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// The Amazon Resource Name (ARN) of the network.
        public let networkArn: String
        /// The token for the next page of results.
        public let startToken: String?

        @inlinable
        public init(filters: [DeviceIdentifierFilterKeys: [String]]? = nil, maxResults: Int? = nil, networkArn: String, startToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.networkArn = networkArn
            self.startToken = startToken
        }

        public func validate(name: String) throws {
            try self.validate(self.networkArn, name: "networkArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "filters"
            case maxResults = "maxResults"
            case networkArn = "networkArn"
            case startToken = "startToken"
        }
    }

    public struct ListDeviceIdentifiersResponse: AWSDecodableShape {
        /// Information about the device identifiers.
        public let deviceIdentifiers: [DeviceIdentifier]?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(deviceIdentifiers: [DeviceIdentifier]? = nil, nextToken: String? = nil) {
            self.deviceIdentifiers = deviceIdentifiers
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case deviceIdentifiers = "deviceIdentifiers"
            case nextToken = "nextToken"
        }
    }

    public struct ListNetworkResourcesRequest: AWSEncodableShape {
        /// The filters.    ORDER - The Amazon Resource Name (ARN) of the order.    STATUS - The status (AVAILABLE | DELETED | DELETING | PENDING | PENDING_RETURN | PROVISIONING | SHIPPED).   Filter values are case sensitive. If you specify multiple  values for a filter, the values are joined with an OR, and the request returns  all results that match any of the specified values.
        public let filters: [NetworkResourceFilterKeys: [String]]?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// The Amazon Resource Name (ARN) of the network.
        public let networkArn: String
        /// The token for the next page of results.
        public let startToken: String?

        @inlinable
        public init(filters: [NetworkResourceFilterKeys: [String]]? = nil, maxResults: Int? = nil, networkArn: String, startToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.networkArn = networkArn
            self.startToken = startToken
        }

        public func validate(name: String) throws {
            try self.validate(self.networkArn, name: "networkArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "filters"
            case maxResults = "maxResults"
            case networkArn = "networkArn"
            case startToken = "startToken"
        }
    }

    public struct ListNetworkResourcesResponse: AWSDecodableShape {
        /// Information about network resources.
        public let networkResources: [NetworkResource]?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(networkResources: [NetworkResource]? = nil, nextToken: String? = nil) {
            self.networkResources = networkResources
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case networkResources = "networkResources"
            case nextToken = "nextToken"
        }
    }

    public struct ListNetworkSitesRequest: AWSEncodableShape {
        /// The filters. Add filters to your request to return a more specific list of results. Use filters to match the status of the network sites.    STATUS - The status (AVAILABLE | CREATED | DELETED | DEPROVISIONING | PROVISIONING).   Filter values are case sensitive. If you specify multiple  values for a filter, the values are joined with an OR, and the request returns  all results that match any of the specified values.
        public let filters: [NetworkSiteFilterKeys: [String]]?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// The Amazon Resource Name (ARN) of the network.
        public let networkArn: String
        /// The token for the next page of results.
        public let startToken: String?

        @inlinable
        public init(filters: [NetworkSiteFilterKeys: [String]]? = nil, maxResults: Int? = nil, networkArn: String, startToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.networkArn = networkArn
            self.startToken = startToken
        }

        public func validate(name: String) throws {
            try self.validate(self.networkArn, name: "networkArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "filters"
            case maxResults = "maxResults"
            case networkArn = "networkArn"
            case startToken = "startToken"
        }
    }

    public struct ListNetworkSitesResponse: AWSDecodableShape {
        /// Information about the network sites.
        public let networkSites: [NetworkSite]?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(networkSites: [NetworkSite]? = nil, nextToken: String? = nil) {
            self.networkSites = networkSites
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case networkSites = "networkSites"
            case nextToken = "nextToken"
        }
    }

    public struct ListNetworksRequest: AWSEncodableShape {
        /// The filters.    STATUS - The status (AVAILABLE | CREATED | DELETED | DEPROVISIONING | PROVISIONING).   Filter values are case sensitive. If you specify multiple  values for a filter, the values are joined with an OR, and the request returns  all results that match any of the specified values.
        public let filters: [NetworkFilterKeys: [String]]?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let startToken: String?

        @inlinable
        public init(filters: [NetworkFilterKeys: [String]]? = nil, maxResults: Int? = nil, startToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.startToken = startToken
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "filters"
            case maxResults = "maxResults"
            case startToken = "startToken"
        }
    }

    public struct ListNetworksResponse: AWSDecodableShape {
        /// The networks.
        public let networks: [Network]?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(networks: [Network]? = nil, nextToken: String? = nil) {
            self.networks = networks
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case networks = "networks"
            case nextToken = "nextToken"
        }
    }

    public struct ListOrdersRequest: AWSEncodableShape {
        /// The filters.    NETWORK_SITE - The Amazon Resource Name (ARN) of the network site.    STATUS - The status (ACKNOWLEDGING | ACKNOWLEDGED | UNACKNOWLEDGED).   Filter values are case sensitive. If you specify multiple  values for a filter, the values are joined with an OR, and the request returns  all results that match any of the specified values.
        public let filters: [OrderFilterKeys: [String]]?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// The Amazon Resource Name (ARN) of the network.
        public let networkArn: String
        /// The token for the next page of results.
        public let startToken: String?

        @inlinable
        public init(filters: [OrderFilterKeys: [String]]? = nil, maxResults: Int? = nil, networkArn: String, startToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.networkArn = networkArn
            self.startToken = startToken
        }

        public func validate(name: String) throws {
            try self.validate(self.networkArn, name: "networkArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "filters"
            case maxResults = "maxResults"
            case networkArn = "networkArn"
            case startToken = "startToken"
        }
    }

    public struct ListOrdersResponse: AWSDecodableShape {
        /// The token for the next page of results.
        public let nextToken: String?
        /// Information about the orders.
        public let orders: [Order]?

        @inlinable
        public init(nextToken: String? = nil, orders: [Order]? = nil) {
            self.nextToken = nextToken
            self.orders = orders
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case orders = "orders"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The resource tags.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct NameValuePair: AWSEncodableShape & AWSDecodableShape {
        /// The name of the pair.
        public let name: String
        /// The value of the pair.
        public let value: String?

        @inlinable
        public init(name: String, value: String? = nil) {
            self.name = name
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case value = "value"
        }
    }

    public struct Network: AWSDecodableShape {
        /// The creation time of the network.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The description of the network.
        public let description: String?
        /// The Amazon Resource Name (ARN) of the network.
        public let networkArn: String
        /// The name of the network.
        public let networkName: String
        /// The status of the network.
        public let status: NetworkStatus
        /// The status reason of the network.
        public let statusReason: String?

        @inlinable
        public init(createdAt: Date? = nil, description: String? = nil, networkArn: String, networkName: String, status: NetworkStatus, statusReason: String? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.networkArn = networkArn
            self.networkName = networkName
            self.status = status
            self.statusReason = statusReason
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "createdAt"
            case description = "description"
            case networkArn = "networkArn"
            case networkName = "networkName"
            case status = "status"
            case statusReason = "statusReason"
        }
    }

    public struct NetworkResource: AWSDecodableShape {
        /// The attributes of the network resource.
        public let attributes: [NameValuePair]?
        /// Information about the commitment period for the radio unit. Shows the duration, the date and time that the contract started and ends, and the renewal status of the commitment period.
        public let commitmentInformation: CommitmentInformation?
        /// The creation time of the network resource.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The description of the network resource.
        public let description: String?
        /// The health of the network resource.
        public let health: HealthStatus?
        /// The model of the network resource.
        public let model: String?
        /// The Amazon Resource Name (ARN) of the network on which this network resource appears.
        public let networkArn: String?
        /// The Amazon Resource Name (ARN) of the network resource.
        public let networkResourceArn: String?
        /// The Amazon Resource Name (ARN) of the network site on which this network resource appears.
        public let networkSiteArn: String?
        /// The Amazon Resource Name (ARN) of the order used to purchase this network resource.
        public let orderArn: String?
        /// The position of the network resource.
        public let position: Position?
        /// Information about a request to return the network resource.
        public let returnInformation: ReturnInformation?
        /// The serial number of the network resource.
        public let serialNumber: String?
        /// The status of the network resource.
        public let status: NetworkResourceStatus?
        /// The status reason of the network resource.
        public let statusReason: String?
        /// The type of the network resource.
        public let type: NetworkResourceType?
        /// The vendor of the network resource.
        public let vendor: String?

        @inlinable
        public init(attributes: [NameValuePair]? = nil, commitmentInformation: CommitmentInformation? = nil, createdAt: Date? = nil, description: String? = nil, health: HealthStatus? = nil, model: String? = nil, networkArn: String? = nil, networkResourceArn: String? = nil, networkSiteArn: String? = nil, orderArn: String? = nil, position: Position? = nil, returnInformation: ReturnInformation? = nil, serialNumber: String? = nil, status: NetworkResourceStatus? = nil, statusReason: String? = nil, type: NetworkResourceType? = nil, vendor: String? = nil) {
            self.attributes = attributes
            self.commitmentInformation = commitmentInformation
            self.createdAt = createdAt
            self.description = description
            self.health = health
            self.model = model
            self.networkArn = networkArn
            self.networkResourceArn = networkResourceArn
            self.networkSiteArn = networkSiteArn
            self.orderArn = orderArn
            self.position = position
            self.returnInformation = returnInformation
            self.serialNumber = serialNumber
            self.status = status
            self.statusReason = statusReason
            self.type = type
            self.vendor = vendor
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case commitmentInformation = "commitmentInformation"
            case createdAt = "createdAt"
            case description = "description"
            case health = "health"
            case model = "model"
            case networkArn = "networkArn"
            case networkResourceArn = "networkResourceArn"
            case networkSiteArn = "networkSiteArn"
            case orderArn = "orderArn"
            case position = "position"
            case returnInformation = "returnInformation"
            case serialNumber = "serialNumber"
            case status = "status"
            case statusReason = "statusReason"
            case type = "type"
            case vendor = "vendor"
        }
    }

    public struct NetworkResourceDefinition: AWSEncodableShape & AWSDecodableShape {
        /// The count in the network resource definition.
        public let count: Int
        /// The options in the network resource definition.
        public let options: [NameValuePair]?
        /// The type in the network resource definition.
        public let type: NetworkResourceDefinitionType

        @inlinable
        public init(count: Int, options: [NameValuePair]? = nil, type: NetworkResourceDefinitionType) {
            self.count = count
            self.options = options
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case count = "count"
            case options = "options"
            case type = "type"
        }
    }

    public struct NetworkSite: AWSDecodableShape {
        ///  The parent Availability Zone for the network site.
        public let availabilityZone: String?
        ///  The parent Availability Zone ID for the network site.
        public let availabilityZoneId: String?
        /// The creation time of the network site.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The current plan of the network site.
        public let currentPlan: SitePlan?
        /// The description of the network site.
        public let description: String?
        /// The Amazon Resource Name (ARN) of the network to which the network site belongs.
        public let networkArn: String
        /// The Amazon Resource Name (ARN) of the network site.
        public let networkSiteArn: String
        /// The name of the network site.
        public let networkSiteName: String
        /// The pending plan of the network site.
        public let pendingPlan: SitePlan?
        /// The status of the network site.
        public let status: NetworkSiteStatus
        /// The status reason of the network site.
        public let statusReason: String?

        @inlinable
        public init(availabilityZone: String? = nil, availabilityZoneId: String? = nil, createdAt: Date? = nil, currentPlan: SitePlan? = nil, description: String? = nil, networkArn: String, networkSiteArn: String, networkSiteName: String, pendingPlan: SitePlan? = nil, status: NetworkSiteStatus, statusReason: String? = nil) {
            self.availabilityZone = availabilityZone
            self.availabilityZoneId = availabilityZoneId
            self.createdAt = createdAt
            self.currentPlan = currentPlan
            self.description = description
            self.networkArn = networkArn
            self.networkSiteArn = networkSiteArn
            self.networkSiteName = networkSiteName
            self.pendingPlan = pendingPlan
            self.status = status
            self.statusReason = statusReason
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "availabilityZone"
            case availabilityZoneId = "availabilityZoneId"
            case createdAt = "createdAt"
            case currentPlan = "currentPlan"
            case description = "description"
            case networkArn = "networkArn"
            case networkSiteArn = "networkSiteArn"
            case networkSiteName = "networkSiteName"
            case pendingPlan = "pendingPlan"
            case status = "status"
            case statusReason = "statusReason"
        }
    }

    public struct Order: AWSDecodableShape {
        /// The acknowledgement status of the order.
        public let acknowledgmentStatus: AcknowledgmentStatus?
        /// The creation time of the order.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The Amazon Resource Name (ARN) of the network associated with this order.
        public let networkArn: String?
        /// The Amazon Resource Name (ARN) of the network site associated with this order.
        public let networkSiteArn: String?
        /// The Amazon Resource Name (ARN) of the order.
        public let orderArn: String?
        /// A list of the network resources placed in the order.
        public let orderedResources: [OrderedResourceDefinition]?
        /// The shipping address of the order.
        public let shippingAddress: Address?
        /// The tracking information of the order.
        public let trackingInformation: [TrackingInformation]?

        @inlinable
        public init(acknowledgmentStatus: AcknowledgmentStatus? = nil, createdAt: Date? = nil, networkArn: String? = nil, networkSiteArn: String? = nil, orderArn: String? = nil, orderedResources: [OrderedResourceDefinition]? = nil, shippingAddress: Address? = nil, trackingInformation: [TrackingInformation]? = nil) {
            self.acknowledgmentStatus = acknowledgmentStatus
            self.createdAt = createdAt
            self.networkArn = networkArn
            self.networkSiteArn = networkSiteArn
            self.orderArn = orderArn
            self.orderedResources = orderedResources
            self.shippingAddress = shippingAddress
            self.trackingInformation = trackingInformation
        }

        private enum CodingKeys: String, CodingKey {
            case acknowledgmentStatus = "acknowledgmentStatus"
            case createdAt = "createdAt"
            case networkArn = "networkArn"
            case networkSiteArn = "networkSiteArn"
            case orderArn = "orderArn"
            case orderedResources = "orderedResources"
            case shippingAddress = "shippingAddress"
            case trackingInformation = "trackingInformation"
        }
    }

    public struct OrderedResourceDefinition: AWSDecodableShape {
        /// The duration and renewal status of the commitment period for each radio unit in the order. Does not show details if the resource type is DEVICE_IDENTIFIER.
        public let commitmentConfiguration: CommitmentConfiguration?
        /// The number of network resources in the order.
        public let count: Int
        /// The type of network resource in the order.
        public let type: NetworkResourceDefinitionType

        @inlinable
        public init(commitmentConfiguration: CommitmentConfiguration? = nil, count: Int, type: NetworkResourceDefinitionType) {
            self.commitmentConfiguration = commitmentConfiguration
            self.count = count
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case commitmentConfiguration = "commitmentConfiguration"
            case count = "count"
            case type = "type"
        }
    }

    public struct PingResponse: AWSDecodableShape {
        /// Information about the health of the service.
        public let status: String?

        @inlinable
        public init(status: String? = nil) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
        }
    }

    public struct Position: AWSEncodableShape & AWSDecodableShape {
        /// The elevation of the equipment at this position.
        public let elevation: Double?
        /// The reference point from which elevation is reported.
        public let elevationReference: ElevationReference?
        /// The units used to measure the elevation of the position.
        public let elevationUnit: ElevationUnit?
        /// The latitude of the position.
        public let latitude: Double?
        /// The longitude of the position.
        public let longitude: Double?

        @inlinable
        public init(elevation: Double? = nil, elevationReference: ElevationReference? = nil, elevationUnit: ElevationUnit? = nil, latitude: Double? = nil, longitude: Double? = nil) {
            self.elevation = elevation
            self.elevationReference = elevationReference
            self.elevationUnit = elevationUnit
            self.latitude = latitude
            self.longitude = longitude
        }

        private enum CodingKeys: String, CodingKey {
            case elevation = "elevation"
            case elevationReference = "elevationReference"
            case elevationUnit = "elevationUnit"
            case latitude = "latitude"
            case longitude = "longitude"
        }
    }

    public struct ResourceNotFoundException: AWSErrorShape {
        /// Description of the error.
        public let message: String
        /// Identifier of the affected resource.
        public let resourceId: String
        /// Type of the affected resource.
        public let resourceType: String

        @inlinable
        public init(message: String, resourceId: String, resourceType: String) {
            self.message = message
            self.resourceId = resourceId
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case resourceId = "resourceId"
            case resourceType = "resourceType"
        }
    }

    public struct ReturnInformation: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the replacement order.
        public let replacementOrderArn: String?
        /// The reason for the return. If the return request did not include a reason for the return, this value is null.
        public let returnReason: String?
        /// The shipping address.
        public let shippingAddress: Address?
        /// The URL of the shipping label. The shipping label is available for download only if the status of the network resource is PENDING_RETURN. For more information, see Return a radio unit.
        public let shippingLabel: String?

        @inlinable
        public init(replacementOrderArn: String? = nil, returnReason: String? = nil, shippingAddress: Address? = nil, shippingLabel: String? = nil) {
            self.replacementOrderArn = replacementOrderArn
            self.returnReason = returnReason
            self.shippingAddress = shippingAddress
            self.shippingLabel = shippingLabel
        }

        private enum CodingKeys: String, CodingKey {
            case replacementOrderArn = "replacementOrderArn"
            case returnReason = "returnReason"
            case shippingAddress = "shippingAddress"
            case shippingLabel = "shippingLabel"
        }
    }

    public struct SitePlan: AWSEncodableShape & AWSDecodableShape {
        /// The options of the plan.
        public let options: [NameValuePair]?
        /// The resource definitions of the plan.
        public let resourceDefinitions: [NetworkResourceDefinition]?

        @inlinable
        public init(options: [NameValuePair]? = nil, resourceDefinitions: [NetworkResourceDefinition]? = nil) {
            self.options = options
            self.resourceDefinitions = resourceDefinitions
        }

        private enum CodingKeys: String, CodingKey {
            case options = "options"
            case resourceDefinitions = "resourceDefinitions"
        }
    }

    public struct StartNetworkResourceUpdateRequest: AWSEncodableShape {
        /// Use this action to extend and automatically renew the commitment period for the radio unit. You can do the following:   Change a 60-day commitment to a 1-year or 3-year commitment. The change is immediate and the hourly rate decreases to the rate for the new commitment period.   Change a 1-year commitment to a 3-year commitment. The change is immediate and the hourly rate decreases to the rate for the 3-year commitment period.   Set a 1-year commitment to automatically renew for an additional 1 year. The hourly rate for the additional year will continue to be the same as your existing 1-year rate.   Set a 3-year commitment to automatically renew for an additional 1 year. The hourly rate for the additional year will continue to be the same as your existing 3-year rate.   Turn off a previously-enabled automatic renewal on a 1-year or 3-year commitment. You cannot use the automatic-renewal option for a 60-day commitment.   For pricing, see Amazon Web Services Private 5G Pricing.
        public let commitmentConfiguration: CommitmentConfiguration?
        /// The Amazon Resource Name (ARN) of the network resource.
        public let networkResourceArn: String
        /// The reason for the return. Providing a reason for a return is optional.
        public let returnReason: String?
        /// The shipping address. If you don't provide a shipping address when replacing or returning a network resource, we use the address from the original order for the network resource.
        public let shippingAddress: Address?
        /// The update type.    REPLACE - Submits a request to replace a defective radio unit. We provide a shipping label that you can use for the return process and we ship a replacement radio unit to you.    RETURN - Submits a request to return a radio unit that you no longer need. We provide a shipping label that you can use for the return process.    COMMITMENT - Submits a request to change or renew the commitment period. If you choose this value, then you must set  commitmentConfiguration .
        public let updateType: UpdateType

        @inlinable
        public init(commitmentConfiguration: CommitmentConfiguration? = nil, networkResourceArn: String, returnReason: String? = nil, shippingAddress: Address? = nil, updateType: UpdateType) {
            self.commitmentConfiguration = commitmentConfiguration
            self.networkResourceArn = networkResourceArn
            self.returnReason = returnReason
            self.shippingAddress = shippingAddress
            self.updateType = updateType
        }

        public func validate(name: String) throws {
            try self.validate(self.networkResourceArn, name: "networkResourceArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
            try self.shippingAddress?.validate(name: "\(name).shippingAddress")
        }

        private enum CodingKeys: String, CodingKey {
            case commitmentConfiguration = "commitmentConfiguration"
            case networkResourceArn = "networkResourceArn"
            case returnReason = "returnReason"
            case shippingAddress = "shippingAddress"
            case updateType = "updateType"
        }
    }

    public struct StartNetworkResourceUpdateResponse: AWSDecodableShape {
        /// The network resource.
        public let networkResource: NetworkResource?

        @inlinable
        public init(networkResource: NetworkResource? = nil) {
            self.networkResource = networkResource
        }

        private enum CodingKeys: String, CodingKey {
            case networkResource = "networkResource"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The tags to add to the resource.
        public let tags: [String: String]

        @inlinable
        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            try container.encode(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x1f\\x22]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TrackingInformation: AWSDecodableShape {
        /// The tracking number of the shipment.
        public let trackingNumber: String?

        @inlinable
        public init(trackingNumber: String? = nil) {
            self.trackingNumber = trackingNumber
        }

        private enum CodingKeys: String, CodingKey {
            case trackingNumber = "trackingNumber"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The tag keys.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            request.encodeQuery(self.tagKeys, key: "tagKeys")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateNetworkSitePlanRequest: AWSEncodableShape {
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the network site.
        public let networkSiteArn: String
        /// The pending plan.
        public let pendingPlan: SitePlan

        @inlinable
        public init(clientToken: String? = nil, networkSiteArn: String, pendingPlan: SitePlan) {
            self.clientToken = clientToken
            self.networkSiteArn = networkSiteArn
            self.pendingPlan = pendingPlan
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.networkSiteArn, name: "networkSiteArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case networkSiteArn = "networkSiteArn"
            case pendingPlan = "pendingPlan"
        }
    }

    public struct UpdateNetworkSiteRequest: AWSEncodableShape {
        /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
        public let clientToken: String?
        /// The description.
        public let description: String?
        /// The Amazon Resource Name (ARN) of the network site.
        public let networkSiteArn: String

        @inlinable
        public init(clientToken: String? = nil, description: String? = nil, networkSiteArn: String) {
            self.clientToken = clientToken
            self.description = description
            self.networkSiteArn = networkSiteArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 100)
            try self.validate(self.networkSiteArn, name: "networkSiteArn", parent: name, pattern: "^arn:aws:private-networks:[a-z0-9-]+:[^:]*:.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case description = "description"
            case networkSiteArn = "networkSiteArn"
        }
    }

    public struct UpdateNetworkSiteResponse: AWSDecodableShape {
        /// Information about the network site.
        public let networkSite: NetworkSite?
        ///  The network site tags.
        public let tags: [String: String]?

        @inlinable
        public init(networkSite: NetworkSite? = nil, tags: [String: String]? = nil) {
            self.networkSite = networkSite
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case networkSite = "networkSite"
            case tags = "tags"
        }
    }

    public struct ValidationException: AWSErrorShape {
        /// The list of fields that caused the error, if applicable.
        public let fieldList: [ValidationExceptionField]?
        /// Description of the error.
        public let message: String
        /// Reason the request failed validation.
        public let reason: ValidationExceptionReason

        @inlinable
        public init(fieldList: [ValidationExceptionField]? = nil, message: String, reason: ValidationExceptionReason) {
            self.fieldList = fieldList
            self.message = message
            self.reason = reason
        }

        private enum CodingKeys: String, CodingKey {
            case fieldList = "fieldList"
            case message = "message"
            case reason = "reason"
        }
    }

    public struct ValidationExceptionField: AWSDecodableShape {
        /// The message about the validation failure.
        public let message: String
        /// The field name that failed validation.
        public let name: String

        @inlinable
        public init(message: String, name: String) {
            self.message = message
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case name = "name"
        }
    }
}

// MARK: - Errors

/// Error enum for PrivateNetworks
public struct PrivateNetworksErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case internalServerException = "InternalServerException"
        case limitExceededException = "LimitExceededException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize PrivateNetworks
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You do not have permission to perform this operation.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// Information about an internal error.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The limit was exceeded.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// The resource was not found.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    ///  The request was denied due to request throttling.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// The request failed validation.
    public static var validationException: Self { .init(.validationException) }
}

extension PrivateNetworksErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "InternalServerException": PrivateNetworks.InternalServerException.self,
        "ResourceNotFoundException": PrivateNetworks.ResourceNotFoundException.self,
        "ValidationException": PrivateNetworks.ValidationException.self
    ]
}

extension PrivateNetworksErrorType: Equatable {
    public static func == (lhs: PrivateNetworksErrorType, rhs: PrivateNetworksErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension PrivateNetworksErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
